﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="Menu.aspx.cs" Inherits="Admin_Menu" Title="Quản lý menu" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link rel="Stylesheet" href="/2013/CSS/Admin.css" type="text/css" />
    <style type="text/css">
        #pnNhap
        {
            margin-top: 10px;
        }
        .GV
        {
            color: White;
            font-size: 17px;
        }
        .GV1
        {
            border: 1px solid #333;
            border-left-style: hidden;
            border-top-style: hidden;
            border-right-style: hidden;
        }
    </style>
    <script type="text/javascript">
        function isNum(num) {
            if (isNum(num))
                return true;
            else return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="pnanel" runat="server">
        <ContentTemplate>
            <div class="tieude">
                QUẢN LÝ MENU</div>
            <div>
                <asp:GridView ID="gvMenu" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    DataKeyNames="Mamenu" CssClass="GV1" PageSize="10" Width="100%" PagerStyle-CssClass="GV"
                    PagerStyle-ForeColor="White">
                    <Columns>
                        <asp:TemplateField HeaderText="Xóa" HeaderStyle-HorizontalAlign="Left">
                            <ItemTemplate>
                                <asp:CheckBox ID="ckq1" runat="server" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" />
                            <HeaderStyle ForeColor="White" />
                            <ItemStyle ForeColor="White" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="Ma" runat="server" Text='<%#Eval("Mamenu") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" />
                            <HeaderStyle ForeColor="White" />
                            <ItemStyle ForeColor="White" />
                            <ControlStyle ForeColor="White" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Vitri" HeaderText="Thứ tự" SortExpression="Vitri">
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemStyle Width="100px" />
                            <HeaderStyle HorizontalAlign="Center" />
                            <HeaderStyle ForeColor="White" />
                            <ItemStyle ForeColor="White" />
                            <ControlStyle ForeColor="White" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Tên menu">
                            <ItemTemplate>
                                <asp:HyperLink ID="hpten" runat="server" Text='<%#Eval("Tenmenu") %>' NavigateUrl='<%#"/Online/Admin/Menu.aspx?"+"m="+Eval("Mamenu") %>'
                                    CssClass="HyperLink1"></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Center" />
                            <HeaderStyle ForeColor="White" />
                            <ItemStyle ForeColor="White" />
                            <ControlStyle ForeColor="White" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Duongdan" HeaderText="Đường dẫn" SortExpression="Duongdan">
                            <ItemStyle HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Center" />
                            <HeaderStyle ForeColor="White" />
                            <ItemStyle ForeColor="White" />
                            <ControlStyle ForeColor="White" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Hienthi" HeaderText="Hiển thị" SortExpression="Hienthi">
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" />
                            <HeaderStyle ForeColor="White" />
                            <ItemStyle Width="100px" />
                            <ItemStyle ForeColor="White" />
                            <ControlStyle ForeColor="White" />
                        </asp:BoundField>
                    </Columns>
                </asp:GridView>
                <div id="pnNhap" style="margin-left: 10px;">
                    <span style="font-size: 17px; color: White;">Vị trí:</span>
                    <asp:TextBox ID="txtvt" runat="server" Width="94px"></asp:TextBox>
                    <span style="font-size: 17px; color: White;">Tên menu:</span>
                    <asp:TextBox ID="txtten" runat="server" Width="240px"></asp:TextBox>
                    <span style="font-size: 17px; color: White;">Đường dẫn:</span>
                    <asp:TextBox ID="txtpath" ToolTip="Chỉ nhập tên trang" runat="server" Width="240px"></asp:TextBox>
                    <span style="font-size: 17px; color: White;">Hiển thị:
                        <asp:RadioButton ID="ht" runat="server" GroupName="ht" Text="Có" Checked="true" />
                        <asp:RadioButton ID="kht" runat="server" GroupName="ht" Text="Không" /></span>
                    <br />
                    <br />
                    <asp:Button ID="btnThem" runat="server" Width="80px" Text="Lưu lại" OnClick="btnThem_Click" />
                    <asp:Button ID="btnSua" runat="server" Width="80px" Text="Sửa" OnClick="btnSua_Click" />
                    <asp:Button ID="btnXoa" runat="server" Text="Xóa" Width="80px" OnClick="btnXoa_Click" />
                    <asp:Button ID="btnHuy" runat="server" Text="Hủy" Width="80px" OnClick="btnHuy_Click" />
                </div>
                <div style="color: White; width: 1024px; float: left; text-align: center; font-style: italic;
                    margin-top: 10px; margin-left: 20px;">
                    <asp:Label ID="tb" runat="server"></asp:Label><br />
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnThem" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnSua" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnXoa" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="pro" runat="server" AssociatedUpdatePanelID="pnanel">
    </asp:UpdateProgress>
</asp:Content>
